import logging
import sys
from app import create_app

# 配置日志记录
logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    handlers=[
        logging.StreamHandler(sys.stdout),
        logging.FileHandler("app.log", encoding="utf-8"),
    ],
)

# 创建Flask应用实例
app = create_app()

if __name__ == "__main__":
    # 运行Flask应用
    app.run(host="0.0.0.0", port=10334, debug=True)
